<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String inviter = request.getParameter("inviter");
    request.setAttribute("inviter", inviter);
    String inviterType = request.getParameter("inviterType");
    request.setAttribute("inviterType", inviterType);
%>
<html>
<head>
    <%@include file="../common/base.jsp" %>
    <meta charset="utf-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <link rel="stylesheet" href="/admin/css/reset.css?v=1.4" type="text/css"/>
    <link rel="stylesheet" href="/admin/css/index.css?version=${version}" type="text/css"/>
    <link rel="stylesheet" href="/admin/js/toastr/toastr.css?version=${version}" type="text/css"/>
    <title>司机申请</title>
    <style>
        .sel-main {

        }

        .sel-head {
            width: 100%;
        }

        .sel-head > img {
            width: 100%;
        }

        .sel-type-list {
            padding: 10px 15px 0 15px;
        }

        .sel-type-list > li {
            display: none;
            margin-bottom: 10px;
        }

        .sel-type-list > li > img {
            width: 100%;
        }
    </style>
</head>
<body>

<div class="sel-main">
    <div class="sel-head">
        <img src="${base}/activity/images/driver_banner.png" alt="">
    </div>
    <ul class="sel-type-list">
        <li class="DRIVER_REGISTER_4" data-value="4">
            <%--快车--%>
            <img src="${base}/activity/images/pic_fast@2x.png" alt="">
        </li>
        <li class="DRIVER_REGISTER_2">
            <%--专车--%>
            <img src="${base}/activity/images/pic_special@2x.png" alt="">
        </li>
<%--        <li class="DRIVER_REGISTER_1" >--%>
<%--            &lt;%&ndash;出租车&ndash;%&gt;--%>
<%--            <img src="${base}/activity/images/pic_taxi@2x.png" alt="">--%>
<%--        </li>--%>
<%--        <li class="DRIVER_REGISTER_3">--%>
<%--            &lt;%&ndash;跨城&ndash;%&gt;--%>
<%--            <img src="${base}/activity/images/pic_sharing@2x.png" alt="">--%>
<%--        </li>--%>
    </ul>
</div>

<script type="text/javascript" src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript" src="${base}/plugin/layer-v3.0.3/layer.js"></script>
<%--<script type="text/javascript" src="${base}/plugin/crypto-js/crypto-js.min.js"></script>--%>
<script type="text/javascript" src="${base}/plugin/jsencrypt/jsencrypt.js"></script>
<script type="text/javascript" src="${base}/activity/giftCollection/js/ajaxUtil.js?version=${version}"></script>
<script type="text/javascript" src="${base}/admin/js/toastr/toastr.js?version=${version}"></script>

<script>
    (function () {
        var openBusiness = '${openBusiness}'
        var gift = jck.ajax;
        gift.ajax_md52(null, '${base}/api/v2/common/getDriRegCfg?appid=${appid}', function (result) {
            var data = result.data;
            for (var i in data) {
                $('.DRIVER_REGISTER_' + data[i]).show();
            }
        });
        var urlList = {
            <%--"DRIVER_REGISTER_1": '${base}/h5/driver/register?agentUuid=null&companyUuid=null&appid=${appid}&inviter=${inviter}&inviterType=${inviterType}&type=1', // 出租车--%>
            "DRIVER_REGISTER_2": '${base}/h5/driver/register?agentUuid=null&companyUuid=null&appid=${appid}&inviter=${inviter}&inviterType=${inviterType}&type=2', // 专车
            <%--"DRIVER_REGISTER_3": '${base}/h5/driver/register?agentUuid=null&companyUuid=null&appid=${appid}&inviter=${inviter}&inviterType=${inviterType}&type=3', // 跨城--%>
            "DRIVER_REGISTER_4": '${base}/h5/driver/register?agentUuid=null&companyUuid=null&appid=${appid}&inviter=${inviter}&inviterType=${inviterType}&type=4', // 快车
        }
        for(var i = 1; i < 5; i++) {
          if (openBusiness.indexOf(i+'') > 0) {
            $('.DRIVER_REGISTER_' + i).show()
          }
        }
        $('.sel-type-list li').on('click', function (e) {
            var self = $(this);
            window.location.href = urlList[self.attr('class')]
        })
    })()
</script>
</body>
</html>
